#ifndef DEVICESEARCH_H
#define DEVICESEARCH_H

#include <QWidget>
#include <QPushButton>
#include <QDebug>
#include <QTcpSocket>
#include <QUdpSocket>
#include <QJsonDocument>
#include <QJsonObject>
#include <QListWidget>

namespace Ui {
class DeviceSearch;
}

class DeviceSearch : public QWidget
{
    Q_OBJECT

public:
    explicit DeviceSearch(QWidget *parent = 0);
    ~DeviceSearch();

public slots:
    //设备搜索
    void onSearchDevicesClicked();
    //处理设备ip
    void onUdpSocketReadyRead();
    //处理请求连接IP
    void onListWidgetItemClicked(QListWidgetItem *item);
    //处理IP回复包信息
    void onTcpConnected();
    void onTcpSocketReadyRead();

private:
    Ui::DeviceSearch *ui;
     QPushButton* pushButton;
     QTcpSocket *tcpSocket;
};

#endif // DEVICESEARCH_H
